<style type="text/css">
div.radio{
	padding-top:10px;
	align:center;
}
div.radio label{
	padding:3px;
	padding-left:5px;
	padding-right:5px;
	margin-left:5px;
	font-size:.9em;

	border:1px solid #99BBE8;
	color:gray;
}
label.checked{
	border: 1px solid red;
	color:dark-gray;
	font-weight:bold;
}
label.checked span{
	float:left;
}
</style>
<div id="login">
    <h2 align="center" style="width: 90%">
        <?php echo $html->image('icons/system-lock-screen.png', array('border'=>0));?>
        Inicio de Sesión
    </h2><br/>
    <?php echo $form->create('Usuario', array('action' => 'login'));?>
        <div style="text-align: center;">
            <?php echo $form->input('usuario');?>
            <?php echo $form->input('password', array('label'=>'Contrase&ntilde;a','div'=>false,'class'=>'noUppercase') );?>

			<?php if($pag !== '/'):?>
			<div class="input radio" style="padding-left:20px">
			<span style="float:left">Ir a:</span>
			<?php echo $form->input(
				'pag',
				array(
					'type'=>'radio',
					'legend'=>false,
					'div'=>false,
					'options'=>array(
						$pag => 'Ultima página',
						'/' => 'Pág. de inicio'
					),
					'value'=>'/',
					'style'=>'display:none'
				));?>
			</div>
			<br/>
			<?php else:?>
			<?php echo $form->input('pag',array('type'=>'hidden', 'value'=>$pag));?>
			<?php endif;?>
			<br/><br/>
            <?php echo $form->submit('Acceder', array(
                'div' => false,
                'class' => 'btnaccept'));
            ?>
        </div>
    <?php echo $form->end(); ?>
</div>
<div align="center">
    <?php $session->flash(); ?>
</div>
<?php echo $javascript->link(array('login.js'), true); ?>